package com.nbsaas.boot.project.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.LongEntity;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.*;
import java.util.Date;


@ComposeView
@org.hibernate.annotations.Table(appliesTo = "bs_business_model", comment = "业务模型")
@Data
@FormAnnotation(model = "业务模型")
@Entity
@Table(name = "bs_business_model")
public class BusinessModel extends LongEntity {

    @SearchItem(label = "项目", name = "project",key = "project.id",classType = Long.class,type = InputType.select)
    @FormField(title = "项目",grid = true, width = "200",type = InputType.select,option = "project")
    @FieldName
    @FieldConvert
    @ManyToOne(fetch = FetchType.LAZY)
    private Project project;

    @SearchItem(label = "模型名称", name = "name")
    @Comment("模型名称")
    @FormField(title = "模型名称", grid = true, width = "200")
    @Column(length = 30)
    private String name;

    @SearchItem(label = "英文名称", name = "enName")
    @Comment("英文名称")
    @FormField(title = "英文名称", grid = true, width = "200")
    @Column(length = 30)
    private String enName;



    @FormField(title = "添加时间", grid = true,width = "10000",ignore = true)
    @Comment("添加时间")
    private Date addDate;


    @Comment("最新修改时间")
    private Date lastDate;
}
